from django.conf.urls import url, include
from rest_framework.urlpatterns import format_suffix_patterns
from OMAI import views
from OMAI.views import api_root

urlpatterns = [
    url(r'^$', api_root),
    url(r'^predict/$', views.FeaturesList.as_view(), name='predict'),
    url(r'^training/$', views.KickoffTraining.as_view(), name='training'),
]


# Login and logout views for the browsable API
urlpatterns += [
    url(r'^api-auth/', include('rest_framework.urls',
                               namespace='rest_framework')),
]


urlpatterns = format_suffix_patterns(urlpatterns)